package com.todo.pro.util;

import com.xiaoleilu.hutool.crypto.SecureUtil;
import com.xiaoleilu.hutool.crypto.symmetric.DES;

public class AesUtil {

	private final static byte[] key = "gq20180613".getBytes();

	public static String encryptHex(String content) {
		DES des = SecureUtil.des(key);
		try {
			return des.encryptHex(content);
		} catch (Exception e) {
			return null;
		}
	}

	public static String decryptStr(String encryptHex) {
		DES des = SecureUtil.des(key);
		try {
			return des.decryptStr(encryptHex);
		} catch (Exception e) {
			return null;
		}
	}

}
